[FEATURE query-params-new] Fix failures in IE8.

* IE8 does not allow `String.substr` to accept negative values. Replacing with
`slice` works well.
* `DOMElem.classList` does not exist in IE8.

@raytiley / @rjackson

Resolves #4239.