Fixing compilation problems with C++ by adding lots of casts.