Add explicit linking with pthread library.