fix fallout of changes to mutex/condvar and stdio