Revert "Remove IE8 compat code"

This reverts commit 64dce642f782bbf2ae267376184ae323f4cd2442.