Trying to get Term::ReadKey working.

I downloaded 2.21 from CPAN, built on RH 9 using gcc 3.2.2
and got this error in make

Checking for sgtty...
Sgtty NOT found.

The interactive test hangs on Readmode 4. Can't get out no matter
what I type, and all characters seem to get buffered until I kill
the test. Clearly not setting the tty correctly, so I
uncommented the lines in Makefile.PL

INC => "-I/usr/include/bsd",
LIBS => "-lbsd"

and rebuilt. This got rid of the sgtty error, but I still get the
same hang in test.pl. The code is below:

ReadMode 4, IN;
$k = "";
#$in = *STDIN;
$in = \*IN; # or *IN or "IN"
while($k ne "q")
{
print "Press a key, or \"q\" to stop: ";
$count=0;
#print "IN = $in\n";
$count++ while !defined($k=ReadKey(-1, $in));
#print "IN2 = $in\n";
print "\nYou pressed `",makenice($k),"' after the loop rolled over $count times\n";
}

The print never happens. Ctl-C is being trapped. Any characters typed show up on
the command line after killing the process, none seem to be read by ReadKey.
Seems to be related to the bsd ioctl calls?

Any ideas?