Make hard-linking work when a device has an st_dev of 0.