make respond_to compatible with Ruby 2.x

Fix for issue #21