US Defense Secretary Hagel visits Pakistan