[rt] Add malloc-collector.

This is a quick hack to allow running with malloc rather than a GC.