Make category filtering work in IE 8

Remove a usage of Array::indexOf which is not supported in IE <= 8.