Fix Debian bug #700358 (patch from Colin Watson).
Fix Debian bug #693968 (patch from Colin Watson).