Use this code in your document head to disable Compatibility Mode in IE 9 and older while still getting IE version classes. Anything that comes before the meta tag disabling Compatibility Mode will in turn cause IE to ignore that meta directive. Conditional comments around the opening body tag gets around this problem, so that's what I've done in this Gist.

(Edit: fixed location of no-js class)