Fix memory_leaks checking script

Some environment variable should be exported.

Change-Id: Ic137ad0c7b8de308417e2344b893db1164e62e1f