Fix build for non-x86 architectures