Fix for FreeImage.h typedef problems for OSX/iOS Xcode

Based on the original changes ofTheo did 3 years ago.
https://github.com/openframeworks/openFrameworks/blob/e1de1d53a9de4f7efe
1af9f028271ff13d508aae/libs/FreeImage/include/FreeImage.h

Updated for the new version of FreeType and to support the new 64bit data structures with the define/undef.