restructure to compile with latest asm.js: all function return values used must be coerced