Convert environment-defined port to a number.