Add type casts to make YAZ C++ compile