Elasticity studies of the critical thickness of an epilayer deposited on a compliant substrate