moving registering of mime types to if defined?(Rails) block