Update parser.js

make it support for node-webkit.