Add rules to generate libmemprof.so and memprofstat.