mingw build fixes for yajl_gen

Win32 doesn't have a `sprintf()` format specification for `long long int`, so on these platforms (32 and 64) we cast the int to `int64_t` and use `PRId64` for the format string.

Also, MinGW already has isnan and isinf defined, so I've put guards around those lines.

For clarification, I'm cross-compiling for win32 and win64 targets from a 64-bit Linux machine.