add to_h to Array for Ruby 1.9