Made changes for cross-compilation less intrusive