Fix build/link on MinGW64