Lattice dynamics of hydrogen in transition metals