Output regulation of nonlinear systems by sliding mode