Converting object's error_category to a ManagedStatic to avoid static constructors and destructors.