xajax: instantiate class only if we are in an xajax call

Signed-off-by: Peter Lieven <pl@kamp.de>