Fix for unresolved pthread lib on linux