Fix build for glib < 2.28
Merge pull request #1121 from abelcheung/master

Fix build for glib < 2.28