Fix for Ruby 1.8.7, which has different semantics for Module#instance_methods.