Magnetohydrodynamic stability of highly elongated axisymmetric equilibria