Fix build with deprecated API disabled

2 jobs for master