check for `undefined` in `getElementsByClassName` to work with IE8
dry a little
forgot a '('
Merge pull request #6 from optikfluffel/fix-ie8-bug

check for undefined in getElementsByClassName to work with IE8