fix raster resampling bug - closes #1489 and fixes mapbox/tilemill#1888