Why limit this to programmers? It's not as if we're some kind of privileged and special sub-species of humanity. People should be allowed to move around the globe at will without those pesky borders. That would be one way to get us out of the hole we're in. Drawing arbitrary lines for certain professions and not for others only further deepens the gap.
Companies have long ago figured out ways to go trans-national, simply by opening up offices in low wage countries.
Another, easy solution if you want more talent is to pay more.