Don't use Array.indexOf in IE8

IE8 does not support Array.indexOf. Instead, use jQuery's $.inArray function which calls Array.indexOf if supported.

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.