How particles acquire their spin: a Higgs-like mechanism