Javascript: Working with Emscripten and example Canvas2D functions