[Qt] Use correct library paths for prefix builds on Mac.