Add Mac suppport to makefile.

Added library variable which contains either libook.so or libook.dylib.
Created additional target for libook.dylib. Replaced all references to
libook.so with ${library}, with the exception of the libook.so target.