Fixed: use portable strchr instead of gnu specific strchrnul.

strchrnul function is a glibc extension. To ensure portability, we
replace it by strchr.