configure: fix writing library dependencies to config.sh