Improved string comparisons.

This was indeed causing a problem on Windows where <mo>(</mo> would
result in some space being rendered 'after' the opening parenthesis
(something analogous happened with a closing parenthesis).