Added compatibility for NDK r9