Cross-compile build fixes