Fix compatibility for Civi beta8