Support uClibc compilation

partly based on aports from Alpine Linux:
http://code.ohloh.net/file?fid=Up3lAbVglPtyupfNPazFHQYMKM8&cid=Sr-nRbkkE8E&s=&fp=302485&mp=&projSelected=true#L0
Merge pull request #3920 from bkuhls/uclibc

Support uClibc compilation