Fixing -pthread flag for Mac OSX.