Move skip_negatives functor out of local scope

This fixes corresponding warning on gcc-4.6