Integrand reduction for two-loop scattering amplitudes through multivariate polynomial division