workqueue: make it work on platforms without __sync_fetch_and_add()