Support for building on MacOS X as part of Android

Change-Id: Ie2eb12ccff59e0e2ebf6e12498c46061821ab9d7