Check for darwin before including osx stuff