Fix build on FreeBSD

Build on FreeBSD fails because XATTR_CREATE and XATTR_REPLACE are not
defined, so provide our own definition of those.