Android build: enabling optimizations based on the value of NDK_BUILD