Detect <codecvt> header automatically

Automatically detects whether or not <codecvt> header is provided.