Fixed spawn_detach on Windows