ghostscript: fix building with djvu support

Fix from @baikal.

Closes #27427