Switched from dlltool (which produces buggy lib files anyway) to wine lib.exe