Finite element modelling of crack propagation in elastic-plastic media