Phase diagrams of the Kane-Mele-Hubbard model in the presence of an external magnetic field