Javascript: Split String into size based chunks