Measuring the top Yukawa coupling at the ILC at $\sqrt{s}=500$ GeV