fix timeout handling of cxxtools::Condition::wait