Macport support

This is what I was talking about with the Makefile argument, totally untested since I don't have a Mac.
Please test and merge to your branch, if you go MIA I'll PR separately and see if someone else can test it.