Cast PROTOCOL_VERSION to an int when using envars