Patch by SafaAlfulaij taken from https://github.com/tinygettext/tinygettext/pull/8. This was SVN commit r16980.