Fix build warnings on MS compilers