Replace assembly version of strlen() to portable C