if ndk.dir was not set in .properties, check ANDROID_NDK and ndk-build path

The build system needs the ant variable ndk.dir set to reliably find the
tools.