make val::as<> compatible with asm.js