As explained in the linked question media queries are media queries and not browser queries and therefore you simply should not even try this. Because what you are searching for is complicated hacks. They are hard to test and they will make your project hard to maintain.
Beside the fact that I really feel sorry for you that you still have to support IE9 I would recommend one of the following solutions:
1) Use conditionals
<!--[if lte IE 9]>
<link rel="stylesheet" type="text/css" href="ie-only.css">
<![endif]-->
This is probably the best way. Microsoft knows IE is bad and this is why they have introduced them. An important bonus: All other browsers do not have to download shitty IE9 CSS.
2) Use a class on the HTML-body (with JavaScript)
var browser = {
isIe: function () {
return navigator.appVersion.indexOf("MSIE") != -1;
},
navigator: navigator.appVersion,
getVersion: function() {
var version = 999; // we assume a sane browser
if (navigator.appVersion.indexOf("MSIE") != -1)
// bah, IE again, lets downgrade version number
version = parseFloat(navigator.appVersion.split("MSIE")[1]);
return version;
}
};
if (browser.isIe() && browser.getVersion() == 9) {
document.body.className += ' ' + 'ie9';
}
In your CSS you simply do:
.ie9 #my-elem-to-style {
}
The simple rules of CSS specificity will solve your problem then.
3) Use a library if it is applicable (e.g. Modernizr)