[gui] strnlen is a gcc extension, use plain strlen