Single-pulse phase-contrast imaging at free-electron lasers in the hard X-ray regime