Fix introspection build

taken from this commit:
https://git.gnome.org/browse/evince/commit?id=1915baa92e72242450b6042603ad0e20de072c17
don't leak memory
don't leak memory, pt.2
don't leak memory, pt.3
don't leak memory, pt.4
don't leak memory, pt.5
don't leak memory, pt.6
don't leak memory, pt.7