build: Fix windows configure when using --with-qt-libdir

fixes #4630

Github-Pull: #4633