US president seeks to defend legacy on the global stage before Donald Trump takes office on January 20.