buildsystem: Fix detection of libelf on RHEL/Fedora systems

Fixes #1

Signed-off-by: Andrew 'Necromant' Andrianov <andrew@ncrmnt.org>