fix javascript global leaks reported by mocha
Merge pull request #53 from snowfix/globals-leak

fix javascript global leaks reported by mocha