Only (re)define constants where needed in Ruby 2.0