Move xml NIF loading to the on_load callback