Dynamic stability of beams with finite displacements and rotations