use ${TOOL_GZIP_N} -9 instead of ${TOOL_GZIP} -9n, etc. This will pass -nT instead of just -n if the gzip program is actually pigz.