Fixes #498 and #499 (IE8 incompatibility). Changes Array.indexOf call to use coffeescript's 'x in Array' construct.
Merge pull request #511 from kartofflly/fix-ie8-incompatibility

Fixes #498 and #499 (IE8 incompatibility)