Added -pthread linker flag