Fix for IE9 which does not support classList

Added addClass and removeClass functions to support IE9.
IE10 has classList. This change is for IE9 and earlier and other old browsers.

To test the change I made for CSSOM (a2356c6c2b1af1c3314db683c3905b54ad8c8e98), I have to tweak this code a bit for IE9 testing.