Fixed compilation issues with MSVC 2012