Improve handling of system root when doing cross-compilation