works on win32

std::iterators weren't used correctly
Merge pull request #8549 from ricardoquesada/win32_fixes

works on win32