Mechanical properties of nanostructured carbon layers grown by CVD and PLD techniques