readline: Support building for Windows with MinGW
This commit is specifically designed to avoid a mass rebuild. I'll make
a follow-up PR to staging which will make the patches unconditional,
etc.
Co-Authored-By: Weijia Wang <9713184+wegank@users.noreply.github.com>
(cherry picked from commit 49d6a6ed8d8839c4d4d43f1ff16c011f638ad8dd)
(cherry picked from commit d6162d7857e76cf07fa5313451e7e8936f894594)