Fixed some issues discovered when building java API example program
Replace tcmalloc_minimal with tcmalloc