Simulation of cracks in a Cosserat medium using the extended finite element method