Fix sync and whoami on windows.