wmifs: Convert strtok() calls to thread-safe strtok_r().