libathemecore: ensure we do not pass NULL to strchr() which is disallowed by POSIX.