Found the reason. Apparently, syslog-ng is split into separate packages on Ubuntu (12). I had to install syslog-ng-mod-json
.
It's really a shame that syslog-ng doesn't give the slightest hint that the function is missing or unknown, instead of some general error.