consistently check for __ANDROID__ not ANDROID define
Add ./configure support for Android