build: fix building on SL5 + EPEL

Fix building of s2 on SL5 platform plus most dependencies coming from
EPEL.
build: include depenendecy on libdiagnose

The code has a dependency on libdiagnose.  This hard-codes that
dependency.