Fixing hasClass without classList, which cannot use .contains anymore.

String.prototype.contains is now compatible with ES6, which doesn't
support the second 'separator' argument anymore.

Thanks @mrpapercut
Yeah I like the split version a little better.