Browser compatibility bugfix for IE8.

Array.prototype.indexOf() and String.prototype.trim() do not exist in IE8; use the jQuery versions of those functions.