gcc 4.7 (-fpermissive forr tdegraphics) and patch for kima header inclusion