Fix usage of task manager in strict standards context