Translate IR code to asmjs instead of going from hoisted code straight to asmjs
Fix bugs in asm.js code conversion and generation