Fix arm build issue #8062. Credit belongs to @Catalin and @indutny