Build fixes for Emscripten (nw)