XWIKI-10251: Build of xwiki-platform breaks with wrong locale

(cherry picked from commit 450301a2a7c0b80735706bc9896c2afbf41fc90f)