fix double free bug in Json module
fix JSMod
Merge pull request #363 from tetsurom/JSModuleFix

fix JavaScript module