Numerical method of crack analysis in 2D finite magnetoelectroelastic media