Origin of the temperature dependence of the band gap of PbS and PbSe quantum dots