add macosx dylib target
fix build