Use defined? instead of const_defined?

Using const_defined(:Rails) returns nil, this returns the correct value. I'm on JRuby 1.7.10 (1.9.3p392).