Fix cross-compiling from Linux to Windows (Closes: #9524).