Thermostats for molecular fluids undergoing shear flow: Application to liquid chlorine