Don't crash when apg is missing

https://bugzilla.gnome.org/show_bug.cgi?id=635808