Merge branch 'backport-1265-visibility-checks-glib-2-62' into 'glib-2-62'

Backport !1265 “build: don't check for protected visibility” to glib-2-62

See merge request GNOME/glib!1266