Compiler errors using GCC4.6 on Ubuntu 12.04

GCC was failing to compile the C++ code with errors about a string namespace and an unsigned int. I've patched these add managed to recompile with the below make file. I have also included a patch file.