fix the makefile for Mac

I have minor update on makefile, so it can be build on Mac.
It been tested on Cygwin(win7), Ubuntu(12.4 LTS), Mac(10.9).