A resonant method for determining the residual stress and elastic modulus of a thin film