Extended Lagrangian Born-Oppenheimer molecular dynamics using a Krylov subspace approximation.