Port to win32
Merge branch 'master' into win32