Remove last platform specific code form thread.cpp