share/server: use toString instead of toSource

Object.toSource is [non-standard][0] and missing in v8 and probably
other javascript VMs. Its better to chop it off now that feel pain later
if we'll decide to move to different javascript engine.

[0]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toSource

/cc @janl