Length Controlled Generation for Black-box LLMs