Add automatic MPI detection