Use indexOf shim from Intl polyfill

Fixes #13 and the Sauce badge.

Also, the previous PR fixes #8 (closing the issue).