Elasticity measurements in the layered dichalcogenides TaSe2and NbSe2