Fix code to compile on VisualStudio2012
Merge branch 'win32_2' into develop