Additional build system fixes for C++/Python/Java bindings.