Added an implementation of strchrnul for platforms (such as Mac OS X) that don't support it