Thermal management of spacecraft