util/strndup: move header inclusion as applicable