Compatibility with flask > 0.10