Fixes to build under MSVC2013 compiler