Thermal conductivity of a material containing cracks of arbitrary shape