Fixes for IE8:
- do not use Array.indexOf

Issue #110