Added OS X compatibility

Inspired by https://github.com/mrballoon/countly-sdk-osx