Build all shared libraries with -no-undefined and link them properly