mingw32 build / test failures in ujson
Fixes for ujson #1387

First commit fixes mingw build issues. Builds ok and tests pass on my mingw and VS 2008, also tested on OSX. Needs testing on enthought mingw though.

More commits to come.
