This fixes #981 and should fix #956
I havent tested 956 after this patch, but it does fix #981 and afaict, they are actually the same underlying issue. It would be nice to have someone do more digging and find out what is actually going on in the win32 api calls boost is making and find the real issue, but this fixes the problem. Also, someone should file a boost bugreport.