add CLEAR_COMPILER_FLAGS & allow LINK_STATIC for non-mingw, too