The quantum trajectory approach to geometric phase for open systems