Getting the code to build on windows

Making the code C98 compliant so it can build using VS2010.