Collective excitations of a one-dimensional Fermi gas under harmonic confinement