Global magnetohydrodynamic simulation of a comet crossing the heliospheric current sheet