Only encode environment keys on 2.x