Fix C++ on Darwin

Port of https://android-review.googlesource.com/207241

Change-Id: Idad81a528a2104579de0225b0724bb81293eea44
3 files changed