Compile Errors under Visual Studio

Fixes for #4