Use macros and remove EPEL5-specific cruft