Fixes for MinGW from LuaBuild