Improve spawn behaviour under windows.