Cast strlen to suppress compiler warnings