Add popt support