build: fix building on SL5 + EPEL

Fix building of s2 on SL5 platform plus most dependencies coming from
EPEL.