Revert fix for bug 1392 because it breaks linking with mingw32