issue #6. fix for compat with werkzeug < 0.9