An equations-of-motion method for anharmonic vibrations: Application to a degenerate shell model