Also allow directly passing subclasses of Extension to register_extensions