Determination of temperature dependent unstressed lattice spacings in crystalline thin films on substrates