avoid global memory leak

if not mocha generate : " Error: global leaks detected: stringLength, tokenLength"
Merge pull request #3 from touv/master

Avoid global memory leak