Fixed a bug related to trim() for IE8.