[ext] Fixed Windows compatibility (closes #1167)