Preliminary support for OSX, not 100% tested yet.