build: Define __printf__ to __gnu_printf__ on MinGW*/gcc

This is necessary to avoid GCC assuming MS style printf arguments.