Fix implementation of string extension for Windows