Compile-fixes for the visual studio c-compiler.

Some small fixes to compile under the crappy c-compiler in visual studio.