Adapt to WTForm library changes