Use FOPEN_MAX to get the maximum files to open

The detection of this feature is broken on MinGW so remove it
completely.