Build system changes to support mingw build target