Support to build in the recent mingw environment

In the recent mingw environment, this patch is needed for defining DS_MODALFRAME etc.