How to list symbols from ELF, Mach-O and PE shared libraries in C