Third-harmonic generation in excitonic insulators