Some build fixes and helpers for Android 4.4 kitkat build with OpenJDK7 on Ubuntu 14.04