Tidy up the utf8 strlen function.