Fix unit tests on RedHat7