Hydrogen molecular ion in an aligned strong magnetic field by the Lagrange-mesh method