fix build for dylib