Cross-browser element class manipulation