Port to Windows platform.

Support on Unix/Linux and Win32 platform.