index.js: fix undefined reference to "event" error