On the density of polynomials under perturbations of the measure