Move Win32-specific code under corresponding #ifdef
Remove unused typedef