Support building QGIS on ARM (#9917)

This patch series fixes the build issues on the ARM architecture. These changes are already used by the Debian package maintained by the Debian GIS team.

See [https://hub.qgis.org/issues/9917](#9917) for more information.