Change the compilers to alias -pthread to -lpthread.