Fixes to make moaiimage better on mac os x