Remove Ruby 2.1.0 dependency by using Hash[x] instead of x.to_h.