Fix build when glib is in non-standard location (e.g. /opt).