Is it correct to define the F-measure as the harmonic mean of specificity and sensitivity in such a way?
Yes, as they are effectively synonyms of one another. See for instance this link

If you pay attention, the first formula is the (weighted) harmonic mean of the recall and precision.