polynomial: fix a problem with the deduction of the result type of a functor
in some systems (SuSE and Fedora, apparently).