do ARCH autodetection based upon compiler instead of host (fix #3153)