Add indexof dependency of package.json

Right now if you want to use `component/emitter` server side, it will break unless you install its dependency `indexof` manually.