Add polyfill for IE8 Array.indexOf

IE8 does not support Array.indexOf. This polyfill adds this missing method when needed (if not supported by the browser).

NB: I have no way of testing this as I did the change on a Windows machine without IE8 and without anything that could compile CouchDB.