Changes to allow MinGW Windows linking