MSVC 12 compatible

Minor fixes, code now can be compiled in Visual Studio 2013 Express at
least.