Fixes #498 and #499 (IE8 incompatibility)

Fixes #498 and #499 (IE8 incompatibility).

Changes a call to ```Array.indexOf``` to use coffeescript's ```if x in Array``` instead, which is automatically shimmed for old JS support.