add gyp support, missing NODE_MODULE usage, and rename source file to keep compatibility with Windows
fix package 'main'
Merged more corrections.