Fixed problem on some architectures to not link agains pthreads.