updated matrix_chain_mul.pl

Removed reliance of convert function on global variable