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

...thread.
I agree with removing this, but as the benefits are very good (over 40% faster compiles with no errors) should we think of warning when this is not enabled?