Cosymplectic reduction for singular momentum maps