Fixed complaints during compilation about using c++ flags as cflags. Changed to a newer toolchain on Android. Fixed indentation.
cstdlib is the proper header file to get std::malloc.