fix memory corruption in setjmp/asm.js; fixes #1087