libbpf: Fix logic for finding matching program for CO-RE relocation