Fix reference errors in ThreadScheduler.cpp