fix compilation with MS compilers