Check for errors when calling lto_codegen_add_module in the gold plugin.

Thanks to Milan Lenčo for noticing it.