'getElementsByClassName' doesn't exist in IE8

Fixes #532.
Merge pull request #596 from spicyj/gh-532

'getElementsByClassName' doesn't exist in IE8