correct the usage of atomic_xchg() in the netbsd compat.