Fix an incompatibility with newer MSYS2 versions that caused the compile.sh script to hang / fail.

We had to replace the call to "cmd.exe /C mklink" due to MSYS2's new path mangling algorithm replacing the /C switch with "C:/", which is obviously wrong and causes cmd.exe to open a window and wait for human input.

Disabling path conversion doesn't help either, though, because then bash "helpfully" tries to quote the quotes around the source and destination path, but cmd.exe then cannot parse them, so it fails.

laszlocsomor@ came up with a PowerShell-based alternative to the cmd.exe call that fixes the problem. Yay, thank you!

I checked our code whether we call "cmd.exe /C" in other places and couldn't find any, so hopefully this is the only place where we have to do this.

PiperOrigin-RevId: 258361256
diff --git a/scripts/bootstrap/buildenv.sh b/scripts/bootstrap/buildenv.sh
index f5ee696..a807af4 100755
--- a/scripts/bootstrap/buildenv.sh
+++ b/scripts/bootstrap/buildenv.sh
@@ -318,7 +318,9 @@
   local dest=$2
 
   if [[ "${PLATFORM}" == "windows" ]]; then
-    cmd.exe /C "mklink /J \"$(cygpath -w "$dest")\" \"$(cygpath -w "$source")\"" >&/dev/null
+    local -r s="$(cygpath -w "$source")"
+    local -r d="$(cygpath -w "$dest")"
+    powershell -command "New-Item -ItemType Junction -Path '$d' -Value '$s'"
   else
     ln -s "${source}" "${dest}"
   fi
@@ -332,7 +334,9 @@
     # Attempt creating a symlink to the file. This is supported without
     # elevation (Administrator privileges) on Windows 10 version 1709 when
     # Developer Mode is enabled.
-    if ! cmd.exe /C "mklink \"$(cygpath -w "$dest")\" \"$(cygpath -w "$source")\"" >&/dev/null; then
+    local -r s="$(cygpath -w "$source")"
+    local -r d="$(cygpath -w "$dest")"
+    if ! powershell -command "New-Item -ItemType SymbolicLink -Path '$d' -Value '$s'"; then
       # If the previous call failed to create a symlink, just copy the file.
       cp "$source" "$dest"
     fi