add Enumerable#to_h

Mostly compatible with Ruby 2.1