US spice-maker McCormick & Co has posted a rise in quarterly earnings, helped by higher shipments and foreign exchange benefits.