uclibc build fixes and recompressed images

Corrections to the FreeRDP trunk to support uclibc

References
https://bugs.gentoo.org/show_bug.cgi?id=497808
https://github.com/FreeRDP/FreeRDP/issues/1660

Also included a lossless image recompression in two other commits (how do I cherry-pick a commit for a pull request?)