plug-ins: fix PDB proc script-fu-selection-to-pattern
Why: this commit fixes PATTERN using code that commit 708f3228 fixed for BRUSH.
Importance: There doesn't seem to be any issues it resolves. No code in the GIMP repo seems to call this procedure. I don't know whether third party plug-ins rely on this procedure. Anyway, fix it so a brute force test works.