test-lib: extract Bash version check for '-x' tracing