Avoid use of $(...) as backticks in SH code

Avoid use of $(...) as backticks in SH code as it is not supported
by all /bin/sh. RT#115708.