Linking errors on linux (lack of pthread)