Fix DOM issues (and failing UTs) in IE9, closes #87