Fix process-statistics issues on 64 bits, and portability issues (specifically on emscripten)