Fix perl hanging during configure (thanks to Luciano Miguel Ferreira Rocha).