Brittle fracture in a ductile material with application to hydrogen embrittlement