When you say add it at the end, you mean compile it back in?
The PR mentions that the coinbaseflags was unused anyway so it must have had some default value set. So you'd either patch the RPC call in Bitcoin Core to return this key and value in the JSON or you paste whatever default value Core was using into cgminer code without fetching it from an RPC call.