Fix for compatability with MinGW