Replace indexOf polyfill with a simpler version which does not crash IE7/8
Merge pull request #2 from chrisbarber86/fix_for_ie8_part_2

Replace indexOf polyfill with a simpler version which does not crash IE7/8