add nodejs support in built file (todo: add it in src files)

backported code from https://github.com/michielbdejong/meute/blob/master/upstream/sockethub-client.js

todo: make the same changes in the correct source files, so that this is the build result.

At least this can serve as a reference for how to get sockethub-client working in a nodejs environment