Fix extractMetadata for Windows