The magnetic field and internal structure of Ganymede