Fix compilation issues wrt 2.4