Fixes for MSVC 2013 build