emscripten: fixes to use bytecode libraries + better after rule