Updated util.py to support MinGW64 environment

Updated the `util.py`'s search methods to support the MinGW64 environment under MS Windows.