use '0.0' to indicate 'use system scale' when creating an image context
detect ios/osx correctly when compiling an extension