Fix import error in the cherry-picked open redirect fix

An import added in the original fix followed the style of
some other similar files in current CKAN, but it's not
compatible with our old 2.0.x, so this is a custom fix for that.

Since we'll probably be doing away with our own CKAN fork anyway,
this direct CKAN modification shouldn't cause problems with future
upgrades.