use the correct flags when using dynamic liniking
cleanup