Windows: give a better error message when running out of memory