Don't segfault in getPDF{Major,Minor}Version when catalog is null.
Catalog is null for locked PDFs. This causes getPDFMajorVersion/getPDFMinorVersion to segfault. This breaks the python-poppler test suite.
Fix by checking for null and reverting to the old behavior.