fix building with musl libc

A set of patches needed to make uwsgi build on musl libc, which is fairly strict.

It is compile tested with musl libc and uClibc.