Fix compatibility with newer php