Fix clang errors and warnings

First fix an error that's present either due Apple messing up their headers, or clang messing up the aliasing of a function defined multiple times.

clang has pretty neat diagnostics. So fix the warnings it spits out.
Only some warnings regarding insecure fmt(gettext()) missing (--enable-nls) and using deprecated on OSX daemon() left.

Code now compiles and tests on OSX with:
./configure CC=cc CXX=c++
+bittorrent +metalink +zlib +libxml2

OK (961)
PASS: aria2c