Add -pthread option and use C++11, not 0x