Heavy neutrinos and the evasion of cosmological bounds