Use indexOf shim from Intl polyfill

Fixes #13 and the Sauce badge.

Also, the previous PR fixes #8 (closing the issue).
This is copypasted from Intl.js.