Changes to kaze related code to allow building with gcc on ubuntu