Fix --extra-ldflags when cross-compiling for MinGW.