Modified to allow simple compiling with VS2008.

Created Makefile to allow easy commandline compiling, and tweaked
code slightly to compile with ancient version of MSVC.