Add all the standard defines that MinGW provides (with the exception of __MINGW__, that's MinGW prerogative). Do not pass along linker options when only compiling.