Fix the "Unmatched start" error.

fixes #3543
Merge pull request #3544 from mozilla/issue_3543-unmatched-start

Fix the "Unmatched start" error.
Stop using [].indexOf - ie8 doesn't have it.

Use _.indexOf instead

fixes #3548
Merge pull request #3549 from mozilla/issue_3548_ie8_error

Stop using [].indexOf - ie8 doesn't have it.