Merge Non-GNU functions

strchrnul is not available on OS X or Windows (hence non-GNU), but as it
turns out it is available on FreeBSD :)