Fix build error on Linux regarding missing pthread references.