Fix enumerable toJSON

`toJSON` needs to return a value which can be subsequently `JSON.stringify`'d without containing `_batman` noise.

The `Hash` code could be more DRY, but `toJSON` is a special case so I felt there wasn't a need to create another abstraction just for it.

@DrewMartin @kristianpd @angelini