pygobject3: fix python3 external linking

See comment below in the PR for explanation.