Fixed method rails_loaded? for when Rails is defined but no application is actually loaded.