Use String.trim() when available, fixes node tests.