build: fix configure option --with-static-libs=libXYZ