The answer is to change the file /etc/gai.conf which controls the getaddrinfo() (see man gai.conf)
For instance, append
precedence ::ffff:0:0/96 100
at the end of /etc/gai.conf to give high priority to A records. The filters can also be more specific and made to apply only to specific addresses or subnets. It doesn't seem to be able to change on a per-process basis with this approach (and of course it requires you to have root privileges to modify /etc/gai.conf).
Thanks to Lmwangi at
http://unix.stackexchange.com/questions/9940/convince-apt-get-not-to-use-ipv6-method