Hash#index is deprecated in Ruby 1.9+

This resolves issue #5