memory_file: fix Android compatibility