Added some compilation for Mac, will expand on Linux and Windows later