Gravitational constraints on the internal structure of Ganymede