Made the code strictly C89 compliant

Now, we are able to compile on Visual Studio 11. Ofcourse, we get
warnings about "insecure" localtime and asctime, but that's to be solved
later on.