Fixed illegal invocation exception under node-webkit.
Merge pull request #9 from iperevozchikov/master

Fixed illegal invocation exception under node-webkit.
Thanks to iperevozchikov