configure: Use -std=c99 instead of -std=gnu99.
configure: Add -pedantic.

Also add -D__USE_MINGW_ANSI_STDIO=1 to suppress MinGW specific warnings.