Add patches for uClibc support

Taken from OpenEmbedded, thanks for the hard work!