Work around measurement problem of wrapped line in IE

Closes #1268