Fix compiler error due to missing pthread header (Issue #2953)
Merge pull request #990 from asmorkalov:pthread_build_fix