fix grepping for the linker invocation

- grep for the object file, -Xlinker isn't always present
simplify appending -lcurl