Fix a bug in the determination of LIB${NAME}_PREFIX.