Windows port: fix crash using boost foreach over std::pair

I could not get this working, there was a fix in this area recently but it didn't help. I've just worked around the issue and avoided doing this.