core: check gobject python module at configure

Fixes #2005