Fix use of HTMLCollections to work with IE8 (grrr!)