Ninja: Fix WINDOWS_EXPORT_ALL_SYMBOLS with PRE_LINK build event

Previously the `__create_def` command could fail in cases where a
`PRE_LINK` custom command changes the working directory.

Fixes: #26973
2 files changed