build: handle a few temporary quirks in flatpak
flatpak 1.5.0 does not build because of a change in glib: https://github.com/flatpak/flatpak/pull/3164
To avoid the above problem we pin flatpak to the commit which resolved the issue. Said commit is not yet available in an official release.
flatpak itself was also failing to build because of a missing ifdef: https://github.com/flatpak/flatpak/pull/3198