fix -pthread issue on linux - closes #2132