Fixing use of globally defined variable

`scriptNode` isn't defined and breaking minification for jshint
Merge pull request #100 from kingpin2k/master

Fixing use of globally defined variable