OFThread: Fix compilation without atomic ops.