Use constants.include? instead of const_defined?

Reason/Difference:

base.const_defined?(const_name) returns true even if the const_name
is not under the scope of base class. might be a ruby 1.9 bug?

constants.include?(const_name) will assure that const_name is within the
scope of base class.