Update gf_base.h

Add support for 2.31 and above.
Only glib.h can be included directly.