Fix build for non-native targets.