fix mismatched malloc/delete[]'s when not using new image resampler