fix circular dependencies when creating xpts
update deprecrated glib mutex and cond var APIs