Deformation waves in thermoelastic media and the concept of internal variables