Fixed an issue if the Document Mode differs from the Browser Mode.

There is an issue if the user has the Document Mode set to something different than the Browser Mode. So if you have your Document Mode set to IE7 standards and your Browser Mode is set to IE8, the user agent will still report that you are using IE8, but in reality you are rendering the page using IE7.