fix bulding with --enable-shared