packaing: Fix build of packages for RedHat based systems

Heavily inspired by github pull request:
https://github.com/lizardfs/lizardfs/pull/176
by georgyous.

Change-Id: I0a5d3925d2949ceb4089c5a7559cfd797a7ceacf