added mbrtoint from R core distro