Distances to the Globular Clusters 47 Tucanae and NGC 362 Using Gaia DR2 Parallaxes