javascript split string into array by delimiter