Closed-path J-integral analysis of bridged and phase-field cracks