fixed some compilation warning/errors related to converting pointers to int (now intptr_t), conversions from string literals to char* and wrong type specifiers in *printf functions, added a Makefile.osx_lib to compile under OSX