Capillary condensation in a disordered mesoporous medium: a grand canonical Monte Carlo study