Fixes #5800: Apply patch correctly on RPM systems