Symmetry transformations and exact solutions of a generalized hyperelastic rod equation