Only run example with BasicObject when BasicObject is defined.

It's not in Ruby < 1.9.