Some build fixes/improvements for Android

Hi, these changes are mainly to facilitate using the cedarx-libs repository as part of an Android repo. I'm using it for a cm10.1 build, and just thought it might be useful for others too.