Added missing header for rand()