re/charset.t: Make sure locale is loaded at compile time
Commit
569f7fc5d4ec06501b46a72075ff434fe1bf4332 caused this test file
to start failing on VMS. The reason is that the test for locale became
run-time. This patch restores the test to compile time, by using the
'if' module.
The reason 'if' wasn't used in the original patch was to reduce reliance
on possibly untested modules, but it makes things easier. We hope to
get a resolution on p5p on which test groups in the suite can use things
like 'if', but since 5.17.9 is due out momentarily, I'm using 'if' for
now so that VMS will pass its tests again.