Fixed a bug related to handling of external memory on Windows.