The structure of interfaces probed by sum-frequency spectroscopy