fix some small compiling issues
make it linking the shared library on macosx64