The effect of cracks on the thermal expansion of rocks