configure.ac: Fix detection of MinGW

This is more consistent with other checks in the file and fixes #75.