Tyrannosaurus rex had a built-in air conditioner, study says