Fix for pthreads and cross_compile