[kaffeine] Patch for gcc6 and cmake changes