added missing #ifdef around #include "thread_mpi.h"