fix spawn tests
win: sort windows environment variables before passing to CreateProcess