fix cumsumg on windows