changes for freeimage to compile on android/linux