Fix mocks to support >=5.5.14 and >=5.4.30