added missing code from node.lib so it compiles on windows