Added implementation of strchrnul

Certain platforms, such as Mac OS X (at least on my computer; I don't see why anyone else's default installation would be different) don't include support for the strchrnul function. So I looked up the function and found what it did, then added my own implementation of it, which can be enabled by setting an option in the makefile.