Metallicity calibrations of galaxies with low star formation rates: the influence of a stochastic IMF