MinGW: Update find_library to not find plain .dll files
Modern distributions of packages built with MinGW tools provide .dll.a
import libraries. Prefer those instead of finding plain .dll
files.
This avoids accidentally finding unrelated Windows .dll
files.
Fixes: #20019 (closed)