Add Windows support.

Tested with mingw and msysgit.