Fix usage of task manager in strict standards context
Merge pull request #595 from romainneutron/task-manager-fix

[3.9] Task manager fix