Innovation and diffusion through environmental regulation