Fix wayland build issues on FreeBSD
Wayland has been available for testing on FreeBSD since the last year, and mutter can be built with wayland enabled but with native backend disabled on FreeBSD after applying these patches.
This merge request includes patches from these two bug reports: