Port WebSphereMQ workaround to ruby 1.9 syntax

In 1.9 syntax `instance_methods` return symbols, not strings. Replaced `instance_methods.include?` with `method_defined?`. Should be backward compatible with 1.8.