Array.prototype.indexOf doesn't exist in IE8

Create an inline polyfill.