Replaced tox_wait* functions with tox_do_run_interval().

Build system fixes.