have a private _compat module to not depend on specific flask version