[tests] Make wc behave consistently across platforms