Add support for older kernels without AT_SYMLINK_FOLLOW or AT_EMPTY_PATH.