Solving surface structures with X-ray diffraction