Change Array#to_h to Hash[] to support 1.9.3 and 2.0