c: Some MinGW setups have strnlen some don't

Just use our own string_length function always. It's used in one
non-critical place anyway.