Fix pluralisation of locales (bug 874802)

This branch fixes the building of langpacks so the pluraliser function is correctly represented and booleans are converted to 0 and 1 respectively.