Made it Node.js compatible. Fixes #16