[Extensions] Build glib message pump on Ozone

Squash this patch with the patch with the same name on the next rebase.

Follow-up patch fixing linking errors when using glib on Ozone and not
building component=shared_library.