Delta-map method of removing CMB foregrounds with spatially varying spectra