build with vs2012 win32

fix some compile error when compile with vs2012 win32, now compiles successful.