simplify tools/config.sh lib prefix detection