runtime: fix for building pmt library properly; also makes its own qa test.