Hartlepool United came from behind to end a run of four games without a win, beating Boston United 2-1.