libharu: fix build without XQuartz

Fixes #17051.