Move some code around

Just to keep Windows specific workarounds in a single place.
1 file changed