Strictly speaking, an ex post facto law is one which makes illegal an act which was legal when committed, or increases the penalty for a crime after it was committed. An act of congress authorizing Jackson's actions after the fact doesn't qualify as an ex post facto law. Same with President Lincoln.
It is commonly percieved to be so, and the classic examples of ex post facto laws fit that description, but the constitution itself places no such criteria on ex post facto - it merely bans them from being enacted. A law that legalizes a previously illegal action after the fact to benefit a friend is accordingly no less "ex post facto" than one that bans a previously legal action after the fact to harm an enemy.