Fix #6 linking with pthread library