Fix library on latest rustc

Use a specialized enum for JsonPath to work around type parameter
invariance of Option.