Fixes to configure script based on suggestions from GigaFin.