Fixed illegal invocation exception under node-webkit.