Don't reference indexOf before polyfilling it. Fixes #253