Environmental Policy when Market Structure and Plant Locations Are Endogenous