add support for IE8

IE8 uses Element in lieu of HTMLElement. If IE8 is in use, `element` is referenced to `Element` instead of `HTMLElement`