CO2 cooling in terrestrial planet thermospheres