The U.S. trade deficit widened in December as a strong dollar and weak global demand continued to weigh on exports.