Detect ie 11 properly

In IE 11, the user agent string was changed and attacheEvent was also
removed. This does not directly depend on the user agent string as this
has changed a bit.
Merge pull request #227 from danshultz/dev-ie-11-updates

Detect ie 11 properly