Endogenous Technological Change and the Environment