It's true that by the 1960s segregation had become an embarrassment to the US when it came to international affairs. This is one of the costs of maintaining segregation, and as I said in a previous post if these sorts of costs keep piling up eventually people may decide that segregation isn't worth it. But desegregation is not essential to the US doing well in the Cold War. As long as the US is economically and militarily powerful other countries are going to be willing to deal with it in the hopes of getting the benefits of partnership. For example, a lot of countries got heavy military/economic assistance from the US, and no matter how morally repulsive they may find segregation they also don't want to lose all that money (there's also a strong element of coercion, since for many countries opposing the US means getting your government toppled and replaced with a pro-American regime).
Also, while it's true that public opinion outside of the South had turned against segregation, one should never underestimate the ability of an influential and well-connected minority to override the will of the majority. At the risk of getting into current politics outside of The Pub, this is why the NRA and other anti-gun control people have been able to block measures which are supported by the vast majority of Americans. Finally, in terms of social liberalization, it's important to remember that there was a huge backlash to this, which became strong enough to help realign US politics in the 1970s-80s. If the Civil Rights Movement can't secure success in the mid-1960s it's totally possible that this backlash could come to encompass supporting segregation (as
@d32123 mentions).