fixing some static lib links, and fix  dll <-> static change cmake