An inverse problem in electromagnetic crack detection