gource: use X11 if it's installed.

References #17143.
Fixes #17246.