Fix mouse events handler to not throw in case the provided Module doesn't have a canvas object. See https://groups.google.com/forum/#!topic/emscripten-discuss/lfPuB5HdE08 .