provider: Use g_type_ensure for registering types

Fixes: https://bugzilla.gnome.org/729173