handles platforms that do not have __sync_add_and_fetch