US food manufacturer JM Smucker has posted a fall in fourth-quarter profits as sales growth was offset by increased input costs.