Make MingW64 work

[CXX_89] Changes to SCons files and minor changes to source files produces a
working mingw64 build of client driver.

msys with mingw64: g++.exe (x86_64-win32-seh, Built by MinGW-W64 project) 4.8.2
boost (1.55) build options: b2 toolset=gcc address-model=64 variant=release link=shared,static threadapi=win32 threading=multi runtime-link=shared -j 4 --prefix=/usr/local/ install
scons build options: scons --cxx=`which g++` --mingw --boost-postfix=-mgw48-mt-1_55 --ssl --sharedclient --prefix=/usr/local/ -j 4 install-mongoclient

Caveats: example builds fail during sharedlibrary build