perf trace/scripting: Fix compile error when libperl not installed