Account for MinGW case in shared lib flags.

The combination of POSIX-style flags plus an shlib_ext of "dll" wasn't
handled properly, resulting in an invalid read and random junk in the
Makefile.