Use #ifdef WIN32 in test/agent_test.cpp