I tried to replace official Python dll with the one built with MinGW and it works. The problem is, that port is very old and so far it seems that official support for building Python under MinGW is nowhere near. I really don't want to use MSVC, so if there's any other way around this, please, let me know.