Extracting convergent surface energies from slab calculations