MSIE documentMode detection

I guess we could delete the user-agent detection, but as I'm not sure, I left it.