Femtosecond nonlinear response of polydiacetylenes and polythiophenes