Additional patches for arm builds

Merging pull requests:
* 4365
* 4366