build: changed detection for i686/x86_64

Fixes compilation/feature detection on arm.
Merge pull request #929 from bmiklautz/armbuild

build: changed detection for i686/x86_64