add gyp support, missing NODE_MODULE usage, and rename source file to keep compatibility with Windows