US will continue to spy on foreign govts: Obama