these modifications seem to be necessary in order to work in jansson2.5