Fixing postFlush event for doctrine >= 2.4