Fixed compiling errors with clang

After these fixes, 7kaa runs fine on OS X Mavericks.