Adding OSX to build matrix

Had to manually define the build matrix to do this. Also make many prerequisite commands conditional on the OS.