packagekit: Fix build with new glib-2.0, v2

* I've accidentally pushed V1 of this patch, this merges changes from
* V2.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>