Fixes for Issue 360

Manfred I have keep all the commit so that it can more readily be reviewed step at a time, but give the word and I will squash it into a single commit.

This branch doesn't attempt to resolve the larger issues in #380 it focuses solely on #360 and making the NDK build hopefully a little more comprehensible. Eg NDK libraries are still constructed in ${basedir}/obj/local