Add extern to some prototypes
Also define json prototypes ourselves. Otherwise, they are defined without extern and have the side effect of defining variables, leading to multiple definitions and compile errors if -fno-common is passed.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/329