A weight function for 2D subsurface cracks under general loading conditions