Enable ie support

This branch is taken from my previous pull request branch so as to avoid a merge conflict. Please see the last commit on this branch for the IE specific changes.