Photoacoustic characterization of the mechanical properties of thin films