Use right type casts in string_compare_by_pointer