Unified cross-compiling detection and configuration