Fix leak in NanAssignPersistent

@bnoordhuis spotted a leak which has gone unnoticed since the beginning.