Fix some incorrect GC rooting api usage
Further fixes to jsdom.cpp (builds against debian-supplied libmozjs24d)