IE8 fix for hasClass