Impedance description of coherent synchrotron radiation with account of bunch deformation