Model Hessian for accelerating first-principles structure optimizations