[Sanitizer] Use different MemoryMappingLayout::DumpListOfModules on Linux and Mac.

Make a unit test added in r198004 more robust.