Use a function to get csrf token.

https://github.com/lepture/flask-wtf/pull/159#discussion_r19521736