build fixes (cross-mingw and x11)