Attempt to support iOS & OS X