Competition between coal and natural gas in producing H2 and electricity under CO2 emission constraints