Elementary divisors of tensor products