Fixing -pthread handling.
Fixing .gitignore