build: optionally enable builtin popt