Modified makefiles for building on Mac