Fix undefined symbols in shared libraries.