X-ray emission lines in the early afterglows of gamma-ray bursts