Phonon-induced spin-spin interactions in diamond nanostructures: application to spin squeezing