Second-order slope–deflection equations for imperfect beam–column structures with semi-rigid connections