Fix Class::MOP Deprecation (RT #90909)

This PR applies the patch from RT #90909.