Win32/C compilation fixes

Add checks for whether _CRT_SECURE_NO_DEPRECATE and WIN32_LEAN_AND_MEAN have already been defined to eliminate possible redefinition warnings.
Add "struct" keyword to "UTPStats*" argument to make C compilers happy.