On Approximating the Distributions of Goodness-of-fit Test Statistics Based on the Empirical Distribution Function: The Case of Unknown Parameters