added support for Ctrl+C and ESC exits. (from node-glfw)