Add String.trim if it's not natively available (IE<9).