Don't segfault on free when we output nothing

Happens when perf isnt available and papi isn't enabled
(we should error our earlier)
Fix compiler when PAPI is enabled