The ground state of the exciton in a magnetic field