Finite temperature gluonic gas in a magnetic field