Comparison between the EBIC and XBIC contrasts of dislocations and grain boundaries