handling undefined refs created by JS SMIL parser (was working fine with C++ SMIL parser)