Add conditional check for presence of mb_strlen function