Fix hasClass on SVG

SVG on some Webkit versions (notably: iOS) don't have attribute classList.