Fixes IE11

The library wouldn't work properly in IE11. This commit fixes the issues
that were preventing it from working in that browser.