compat: Added macros and header fixes to support RHEL7.3