runtime: fix swig/build with linux perf events