Reorder libs so we can also link against static libs.