graphics/dspdfviewer: Add compatibility for CMake 4
PR: 297966 Tested by: Gleb Popov <arrowd@FreeBSD.org>