Highly accurate analytical energy of a two-dimensional exciton in a constant magnetic field