Add polyfill for browser with old classList implementation

Based on https://gist.github.com/3952026