A Liouville-type theorem for harmonic functions on exterior domains