fix C4099 warnings in Visual Studio
Fix C4244, C4305, C4018 warnings in Visual Studio
Support necessary image formats on OS X
Add missing headers on OS X
Analysis: fix integer narrowing
Fix initializer syntax warnings
Update SGLib