Guess system XQuartz version when mdfind fails

Fixes #16857.