The YORP effect with finite thermal conductivity