compiling fixes for visual c++ 11/12