dns/py-ldns: Fix build with swig 4.2.0+
PR: 279489 Obtained from: https://github.com/NLnetLabs/ldns/pull/231