gst-python: gstmodule.c: fix build with 3.11

Merged Mathieu Duponchelle requested to merge meh/gstreamer:fix-python-3-11-build into main

Merge request reports