build: Convert libreadline detection to new macros.