[safestack] add FreeBSD abstraction