Fix compile errors

Apparently local types can't be used as template arguments.
Target at least Windows XP

Set the _WIN32_WINNT macro to _WIN32_WINNT_WINXP. This is needed for
certain Win32 functions, e.g. GetProcessId(), to be available.

See this MSDN article for possible values of _WIN32_WINNT:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx#setting_winver_or__win32_winnt