Parse Swift authentication headers case-insensitively

1.8.x version of #467