Genetic diversity and structure of an endangered medicinal herb: implications for conservation