Fixes #6013, #6014 - changes for RHEL7

I don't want to delete the file, I plan some interface extraction in the upcoming post 1.6 refactoring and split.