Phonon softening and the metal-insulator transition in VO2