Buckling analysis through a generalized beam model including section distortions