Fixed Windows MPI support for 3.1; added an isinf #define for Windows compatibility.