Or a variation on the same theme: just take a cheap rubber band and loop it a few times around the barrel, then put the lanyard between the loops.