A system for sex determination from degraded DNA: a useful tool for palaeogenetics and conservation genetics of ursids