use -O2 as default
include libpthread, fix exception in std::thread