The strength of the US dollar has weighed on quarterly earnings at Wal-Mart, the world's largest retailer.