Fix compilation errors in some doc tests