Department store retailer Dillard's has returned to third-quarter profit, mainly due to better gross margin performance.