Javascript porting of curses library using Emscripten