Added patch to automatically detect if tests are running under Wine.