A group analysis of the 2D Navier-Stokes-Fourier equations