Output regulation by error dynamic feedback in hybrid systems with periodic state jumps