look for libs in $${PREFIX}/lib/$$system(gcc -print-multiarch)

as this is a Debian-only feature, fall back to the old $${PREFIX}/lib64 when gcc exits with an error.