Ah, that won't work in 1.8.

In 1.8 you can rely on the fact that const_defined? does not look into the
ancestors. I guess a portable solution will need to have code that depends
on the Ruby version.