ldgen: fix issue when not built in msys2
ldgen: fix issue when not built in msys2

Closes https://github.com/espressif/esp-idf/issues/2812

espressif/esp-idf,espressif/esp-idf,espressif/esp-idf,espressif/esp-idf