Compiling as a static lib on windows MinGW