ecmascript: Implicit toString() in hashUpdate

Fixes #2365