Add OS X capacity to native lib makefile

Modify the makefile to link dynamic library on OS X.