Fix for undefined keys

Without this fix, one can’t use `undefined` as a key. `hash.get(undefined)` returns the whole object instead of the key, and `hash.del` called on a key with an `undefined` value would not delete this key.

I also simplified the internal `hash` function instead of doing a pull request just for that.