Anise seeds can be a good substitute as they also have a licorice flavor. Since anise seeds have a stronger flavor, you can use them in small amounts.