Buckling of thin-walled structures through a higher order beam model