Hash with compare_by_identity should not copy keys

Also see:
https://github.com/jruby/jruby/issues/1664
https://github.com/rubinius/rubinius/issues/3017