javascript: fix ptr handling
Merge pull request #292 from raichoo/javascript

javascript: fix ptr handling