Use indexOf shim all the time

This PR includes two fixes:
- use indexOf shim all the time
- in the `package.json` file there is no need to specify `node_modules/.bin`, as npm will put that folder on the path