freebsd: fix atomic ops implementations