Temperature dependence of the energy of a vortex in a two-dimensional Bose gas