Merck quarterly profit tops expectations on COVID pill surprise