work around broken try_lock_for in gcc