Use const_defined? rather than ||= to maintain ruby 1.8 support.