Use mpl.checkdep_ghostscript function to find ghostscript

Fix issue #2669