Thermoelastic analysis of layered structures with imperfect layer contact