Add std::thread support