Algebraic versus homological equivalence for singular varieties