(#11276) Fix require ordering issue on Windows

Make sure we require msvcrt/buffer is required before using it.