Add linking with pthread