ENH: minor fixes for compilation with Visual C++