Phonon-mediated spin-flipping mechanism in the spin ices Dy 2 Ti 2 O 7 and Ho 2 Ti 2 O 7