copied minor changes from the most recent version of https://github.com/dcjones/hat-trie, including an updated pstdint.h for improved compatibility