Thermal flexure and glacier calving