The BSD version of sed that is included with macOS crashes when it encounters the (c) symbol in NDK includes, and has some other compatibility issues, so use GNU sed on macos instead.