sharing: Fix build without NetworkManager

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