fix api with old version

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Merge pull request #3882 from vieux/fix_compat_api

fix api with old version