[cmake,release] Activate MPI in headercheck.

Somehow MPI was never activated for the headercheck. This patch fixes this.