Using set_new_handler and bad_alloc