Merck is spending $3 billion on an eye drug developer as it braces to lose a key cancer patent