Make ngettext compatible with both APIs

Flask-Babel defines variabls['num'] to be available and we need to handle the non-existing key case for jinja.