This PR fixes two problems that happen with recent nixpkgs. The first commit works around compilation errors that happen when IWYU is enabled with (-DMP_ENABLE_IWYU=ON) that were caused by https://github.com/NixOS/nixpkgs/pull/445095. The second commit fixes problems building old versions of Cap'n Proto with CMake 4.0 in shell.nix.
Neither problem has showed up so far running in github actions, only running locally with unstable nixpkgs. More details about the problems and fixes are in the commit messages.