Receiver Williams agrees to contract terms with Cowboys