Fix for IE7

getAttribute does not work properly in IE7. This fix uses array style access in IE8 and below (the spellchecker would not turn off in IE7, as there were no elements found to unwrap).