Rewrite nodejs bindings with in-line native definitions

Related to #158