Yes, a pilot operating an international flight operates in airports of the 2 countries connected, and perhaps also the airspace of the countries oveflown (as in this case). And if an obvious criminal is discovered, it is reasonable for any country where he or she is found to detain him or her.
But since the said pilot was defrauding the state of Libya, getting salary in Libya, flying on Libyan flagged planes subject to Libyan civil aviation authorities and breaching Libyan civil aviation regulations, surely he should have been extradited to Libya for trial and punishment?