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
Updated.