Federer wins Open thriller over Millman