Move more windows specific code out of main.go.