The first two are cherry picks from the master branch. @ofourdan @whot
The last one fixes a meson warning I noticed.