String.trim() backwards compatibility (as per mozilla).