Possible in situ formation of meteoritic nanodiamonds in the early Solar System