Brexit: UK may need extra time, says foreign secretary