Merge pull request #1 from borisyankov/master

Update
Fix bug in node-webkit when requiring "nw.gui"
Update tests to use require()
Fix failed test
Merge pull request #3108 from nikeee/master

Fix bug in node-webkit when requiring nw.gui