Add a kludge to work around poor dimension measurements in bidi text in IE

Closes #1129