Ported to MinGW