Fix compatibility with current Flask HEAD