Retrieving of the complex degree of spatial coherence of electron beams