Quantization of Wilson loops in Wess-Zumino-Witten models