Intrinsic stress in thin films of Ag, Al, ZnS and LiF