Fixed the lack of "return self" in js version.

...Also enabled it as Node.JS module.