have made osx compatible - may have broken the makefile for windows though