Fix adding/removing CSS classes in IE7.

This is required to get ng-show/ng-hide working with IE7.