We present a method that allows one to measure the real and imaginary parts of the third-order susceptibility in a wide-field coherent anti-Stokes Raman scattering setup using a quadriwave lateral shearing interferometer. This permits the retrieval of the undistorted Raman spectrum and the removal of a nonresonant signal from the surrounding solvent, which otherwise may overwhelm weak resonances.