Cosmological dependence of sterile neutrino dark matter with self-interacting neutrinos