Fix handling of layout configuration from log4js JSON

When the user specifies a layout in the log4js configuration JSON, log4js-ain2 crashes. This fixes all issues with using user specified layouts.