MAID-322: Added -pthread compiler flag for Unix builds and changed -lpthread to -p...

...thread.