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

On Ruby 1.8 Using ||= on a previously undefined constant results in an
error.