Reconstruction of the (111) and (001) surfaces of Au and Pt: thermal behavior