Link against pthread library as well.