javascript split string on first occurrence of character