Possible fixes for IE8 support

- Allow binding Input events to document or document.body, in addition
  to element, target, and window.  This was done because in IE8 mouse
events do not bubble to the window.
- For IE8, attach mouse event handlers to document.body, rather than
  window (because mouse events do not bubble to window).
- Make the add/removeEventListeners helper fall back to
  attach/detachEvent if the standard methods do not exist (for IE8).