How to add conditional HTML meta tag using drupal_add_html_head to force only IE9 into compatibility mode?
Had similar problem:

function detect_ie() {
    if (isset($_SERVER['HTTP_USER_AGENT']) &amp;&amp; (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) {
        return true;
    }
    else {
        return false;
    }
}


above will detect if IE in general. You will need to change 'MSIE' accordingly (something  like 'MSIE9' but not sure if thats correct).

Then what i did was 

if(detect_ie()) {
  $element = array(
  '#tag' =&gt; 'meta',
  '#attributes' =&gt; array(
  'http-equiv' =&gt; 'X-UA-Compatible',
    'content' =&gt;  'IE=EmulateIE7',
     ),
  );
drupal_add_html_head($element, 'IE_cr_ap');
}